package com.zhu.shop.app.controller;

import com.zhu.shop.app.model.params.BuyParams;
import com.zhu.shop.app.service.BuyService;
import com.zhu.shop.common.Vo.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/buy")
public class BuyController {
    @Autowired
    private BuyService buyService;
    @PostMapping("/submit")
    public Result submitOrder(@RequestBody BuyParams buyParams){
        return buyService.submitOrder(buyParams);
    }
}
